//
//  YWInspectionLineRecord.m
//  maintain
//
//  Created by Kyo on 16/5/26.
//  Copyright © 2016年 ewin. All rights reserved.
//

#import "YWInspectionLineRecord.h"
#import "MJExtension.h"
#import "YWCommonTool.h"
#import "YWInspectionMissionModel.h"

@implementation YWInspectionLineRecord
+ (NSDictionary*)mj_replacedKeyFromPropertyName
{
    return @{ @"result" : @"resultCode" };
}
+ (NSDictionary*)mj_objectClassInArray
{
    return @{@"executors" : @"YWHandler",
             @"equipmentRecords" : @"YWInspectionEquipmentRecord",
             @"locationRecords" : @"YWInspectionEquipmentRecord"};
}
+ (NSArray *)mj_ignoredPropertyNames
{
    return @[@"inspectionLineId",@"executorIds",@"allKindRecord"];
}
- (void)mj_keyValuesDidFinishConvertingToObject{
    if (self.executors.count) {
        self.executorIds = [YWCommonTool handlerIdsWithHandlerArray:self.executors];
    }
    if (self.inspectionLine) {
        self.inspectionLineId = self.inspectionLine.inspectionLineId;
    }
    self.allKindRecord = [NSMutableArray array];
    [_allKindRecord addObjectsFromArray:_equipmentRecords];
    [_allKindRecord addObjectsFromArray:_locationRecords];
}
@end

@implementation YWInspectionMissionInfoJson
+ (NSDictionary *)mj_objectClassInArray{
    return @{@"replies" : @"YWReply"};
}
@end


